import { getColumnsData } from "../common";

const giveRecordListTable = [
  {
    user_id: "ID: 4997", // 用户ID
    user_name: "昵称: 155****5555", // 用户名
    accept_user_id: "ID: 4997", // 接收用户ID
    accept_user_name: "昵称: 188****1302", // 接收昵称
    lottery_id: "41079", // 奖品ID
    lottery_title: "入耳式降噪游戏蓝牙耳机", // 奖品名称
    handle_time: "2019-01-01 00:00:00" // 操作时间
  }
];

const headerList = [
  {
    width: "100px",
    label: "编号",
    prop: "id",
    sortable: true
  },
  {
    width: "300px",
    label: "购买用户",
    showValue: [
      {
        class: "",
        key: "user_id",
        tableType: "giveRecordList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      },
      {
        class: "",
        key: "user_name",
        tableType: "giveRecordList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      }
    ]
  },
  {
    width: "300px",
    label: "接收用户",
    showValue: [
      {
        class: "",
        key: "accept_user_id",
        tableType: "giveRecordList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      },
      {
        class: "",
        key: "accept_user_name",
        tableType: "giveRecordList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      }
    ]
  },
  {
    width: "100px",
    label: "奖品ID",
    prop: "lottery_id"
  },
  {
    width: "auto",
    label: "奖品名称",
    prop: "lottery_title"
  },
  {
    width: "240px",
    label: "申请发货时间",
    prop: "handle_time"
  }
];

const giveRecordListColumns = [];

getColumnsData("giveRecordList", giveRecordListColumns, headerList, res => {
  console.log("giveRecordList", res);
});
export { giveRecordListTable, giveRecordListColumns };
